# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

"""
winapi_constants.py
By: Denver Coneybeare <denver@sleepydragon.org>
Nov 14, 2012

This module defines C constants from the Windows API that are used by the
winnotify package.  This module is a complement to the winnotify.winapi module,
whose functions generally take values defined in this module as parameters.
"""

# defined in WinUser.h
# the starting point of user-defined messages
WM_USER = 0x0400

# defined in ShellAPI.h
# specified to Shell_NotifyIcon() as the "dwMessage" argument
NIM_ADD = 0x00000000
NIM_MODIFY = 0x00000001
NIM_DELETE = 0x00000002
NIM_SETFOCUS = 0x00000003
NIM_SETVERSION = 0x00000004

# defined in ShellAPI.h
# specified to Shell_NotifyIcon() via the NOTIFYICONDATA.uVersion property
NOTIFYICON_VERSION = 3
NOTIFYICON_VERSION_4 = 4

# defined in ShellAPI.h
# specified to Shell_NotifyIcon() via the NOTIFYICONDATA.uFlags property
NIF_MESSAGE = 0x00000001
NIF_ICON = 0x00000002
NIF_TIP = 0x00000004
NIF_STATE = 0x00000008
NIF_INFO = 0x00000010
NIF_GUID = 0x00000020
NIF_REALTIME = 0x00000040
NIF_SHOWTIP = 0x00000080

# defined in ShellAPI.h
# specified to Shell_NotifyIcon() via the NOTIFYICONDATA.dwInfoFlags property
# to set or modify the behavior and appearance of a balloon notification
NIIF_NONE = 0x00000000
NIIF_INFO = 0x00000001
NIIF_WARNING = 0x00000002
NIIF_ERROR = 0x00000003
NIIF_USER = 0x00000004
NIIF_ICON_MASK = 0x0000000F
NIIF_NOSOUND = 0x00000010
NIIF_LARGE_ICON = 0x00000020
NIIF_RESPECT_QUIET_TIME = 0x00000080

# defined in WinUser.h
# can be specified to CreateWindowEx() as the x, y, nWidth, or nHeight arguments
CW_USEDEFAULT = 0x80000000

# window styles defined in WinUser.h
# specified to CreateWindowEx() as the dwStyle argument
# http://msdn.microsoft.com/en-us/library/windows/desktop/ms632600%28v=vs.85%29.aspx
WS_OVERLAPPED = 0x00000000
WS_POPUP = 0x80000000
WS_CHILD = 0x40000000
WS_MINIMIZE = 0x20000000
WS_VISIBLE = 0x10000000
WS_DISABLED = 0x08000000
WS_CLIPSIBLINGS = 0x04000000
WS_CLIPCHILDREN = 0x02000000
WS_MAXIMIZE = 0x01000000
WS_CAPTION = 0x00C00000
WS_BORDER = 0x00800000
WS_DLGFRAME = 0x00400000
WS_VSCROLL = 0x00200000
WS_HSCROLL = 0x00100000
WS_SYSMENU = 0x00080000
WS_THICKFRAME = 0x00040000
WS_GROUP = 0x00020000
WS_TABSTOP = 0x00010000
WS_MINIMIZEBOX = 0x00020000
WS_MAXIMIZEBOX = 0x00010000
WS_TILED = WS_OVERLAPPED
WS_ICONIC = WS_MINIMIZE
WS_SIZEBOX = WS_THICKFRAME
WS_OVERLAPPEDWINDOW = (WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME |
    WS_MINIMIZEBOX | WS_MAXIMIZEBOX)
WS_POPUPWINDOW = WS_POPUP | WS_BORDER | WS_SYSMENU
WS_CHILDWINDOW = WS_CHILD
DS_MODALFRAME = 0x80
WS_ACTIVECAPTION = 0x0001

# extended window styles defined in WinUser.h
# specified to CreateWindowEx() as the dwExStyle argument
# http://msdn.microsoft.com/en-us/library/windows/desktop/ff700543%28v=vs.85%29.aspx
WS_EX_DLGMODALFRAME = 0x00000001
WS_EX_NOPARENTNOTIFY = 0x00000004
WS_EX_TOPMOST = 0x00000008
WS_EX_ACCEPTFILES = 0x00000010
WS_EX_TRANSPARENT = 0x00000020
WS_EX_MDICHILD = 0x00000040
WS_EX_TOOLWINDOW = 0x00000080
WS_EX_WINDOWEDGE = 0x00000100
WS_EX_CLIENTEDGE = 0x00000200
WS_EX_CONTEXTHELP = 0x00000400
WS_EX_RIGHT = 0x00001000
WS_EX_LEFT = 0x00000000
WS_EX_RTLREADING = 0x00002000
WS_EX_LTRREADING = 0x00000000
WS_EX_LEFTSCROLLBAR = 0x00004000
WS_EX_RIGHTSCROLLBAR = 0x00000000
WS_EX_CONTROLPARENT = 0x00010000
WS_EX_STATICEDGE = 0x00020000
WS_EX_APPWINDOW = 0x00040000
WS_EX_OVERLAPPEDWINDOW = (WS_EX_WINDOWEDGE | WS_EX_CLIENTEDGE)
WS_EX_PALETTEWINDOW = (WS_EX_WINDOWEDGE | WS_EX_TOOLWINDOW | WS_EX_TOPMOST)
WS_EX_LAYERED = 0x00080000
WS_EX_NOINHERITLAYOUT = 0x00100000
WS_EX_LAYOUTRTL = 0x00400000
WS_EX_COMPOSITED = 0x02000000
WS_EX_NOACTIVATE = 0x08000000

# OEM bitmap IDs defined in WinUser.h
# Can be specified to LoadImage() for the lpszName argument if the fuLoad
# argument omits the LR_LOADFROMFILE value to specify the OEM bitmap to load
# http://msdn.microsoft.com/en-us/library/windows/desktop/dd145033%28v=vs.85%29.aspx
OBM_CLOSE = 32754
OBM_UPARROW = 32753
OBM_DNARROW = 32752
OBM_RGARROW = 32751
OBM_LFARROW = 32750
OBM_REDUCE = 32749
OBM_ZOOM = 32748
OBM_RESTORE = 32747
OBM_REDUCED = 32746
OBM_ZOOMD = 32745
OBM_RESTORED = 32744
OBM_UPARROWD = 32743
OBM_DNARROWD = 32742
OBM_RGARROWD = 32741
OBM_LFARROWD = 32740
OBM_MNARROW = 32739
OBM_COMBO = 32738
OBM_UPARROWI = 32737
OBM_DNARROWI = 32736
OBM_RGARROWI = 32735
OBM_LFARROWI = 32734
OBM_OLD_CLOSE = 32767
OBM_SIZE = 32766
OBM_OLD_UPARROW = 32765
OBM_OLD_DNARROW = 32764
OBM_OLD_RGARROW = 32763
OBM_OLD_LFARROW = 32762
OBM_BTSIZE = 32761
OBM_CHECK = 32760
OBM_CHECKBOXES = 32759
OBM_BTNCORNERS = 32758
OBM_OLD_REDUCE = 32757
OBM_OLD_ZOOM = 32756
OBM_OLD_RESTORE = 32755

# OEM icon IDs defined in WinUser.h
# Can be specified to LoadImage() for the lpszName argument if the fuLoad
# argument omits the LR_LOADFROMFILE value to specify the OEM icon to load
OCR_ICOCUR = 32647 # OBSOLETE: use OIC_WINLOGO
OIC_SAMPLE = 32512
OIC_HAND = 32513
OIC_QUES = 32514
OIC_BANG = 32515
OIC_NOTE = 32516
OIC_WINLOGO = 32517
OIC_WARNING = OIC_BANG
OIC_ERROR = OIC_HAND
OIC_INFORMATION = OIC_NOTE
OIC_SHIELD = 32518

# OEM cursor IDs defined in WinUser.h
# Can be specified to LoadImage() for the lpszName argument if the fuLoad
# argument omits the LR_LOADFROMFILE value to specify the OEM cursor to load
OCR_NORMAL = 32512
OCR_IBEAM = 32513
OCR_WAIT = 32514
OCR_CROSS = 32515
OCR_UP = 32516
OCR_SIZE = 32640 # OBSOLETE: use OCR_SIZEALL
OCR_ICON = 32641 # OBSOLETE: use OCR_NORMAL
OCR_SIZENWSE = 32642
OCR_SIZENESW = 32643
OCR_SIZEWE = 32644
OCR_SIZENS = 32645
OCR_SIZEALL = 32646
OCR_ICOCUR = 32647 # OBSOLETE: use OIC_WINLOGO
OCR_NO = 32648
OCR_HAND = 32649
OCR_APPSTARTING = 32650

# defined in WinUser.h
# specified to LoadImage() for the uType argument to indicate the type of
# image to load
IMAGE_BITMAP = 0
IMAGE_ICON = 1
IMAGE_CURSOR = 2

# defined in WinUser.h
# specified to LoadImage() for the fuLoad argument
LR_DEFAULTCOLOR = 0x00000000
LR_MONOCHROME = 0x00000001
LR_COLOR = 0x00000002
LR_COPYRETURNORG = 0x00000004
LR_COPYDELETEORG = 0x00000008
LR_LOADFROMFILE = 0x00000010
LR_LOADTRANSPARENT = 0x00000020
LR_DEFAULTSIZE = 0x00000040
LR_VGACOLOR = 0x00000080
LR_LOADMAP3DCOLORS = 0x00001000
LR_CREATEDIBSECTION = 0x00002000
LR_COPYFROMRESOURCE = 0x00004000
LR_SHARED = 0x00008000

# elements of the SHSTOCKICONID enumeration defined in ShellAPI.h
# specified to SHGetStockIconInfo() as the siid argument to indicate the icon
# http://msdn.microsoft.com/en-us/library/windows/desktop/bb762542%28v=vs.85%29.aspx
SIID_DOCNOASSOC = 0          # document (blank page) no associated program
SIID_DOCASSOC = 1            # document with an associated program
SIID_APPLICATION = 2         # generic application with no custom icon
SIID_FOLDER = 3              # folder (closed)
SIID_FOLDEROPEN = 4          # folder (open)
SIID_DRIVE525 = 5            # 5.25" floppy disk drive
SIID_DRIVE35 = 6             # 3.5" floppy disk drive
SIID_DRIVEREMOVE = 7         # removable drive
SIID_DRIVEFIXED = 8          # fixed (hard disk) drive
SIID_DRIVENET = 9            # network drive
SIID_DRIVENETDISABLED = 10   # disconnected network drive
SIID_DRIVECD = 11            # CD drive
SIID_DRIVERAM = 12           # RAM disk drive
SIID_WORLD = 13              # entire network
SIID_SERVER = 15             # a computer on the network
SIID_PRINTER = 16            # printer
SIID_MYNETWORK = 17          # My network places
SIID_FIND = 22               # Find
SIID_HELP = 23               # Help
SIID_SHARE = 28              # overlay for shared items
SIID_LINK = 29               # overlay for shortcuts to items
SIID_SLOWFILE = 30           # overlay for slow items
SIID_RECYCLER = 31           # empty recycle bin
SIID_RECYCLERFULL = 32       # full recycle bin
SIID_MEDIACDAUDIO = 40       # Audio CD Media
SIID_LOCK = 47               # Security lock
SIID_AUTOLIST = 49           # AutoList
SIID_PRINTERNET = 50         # Network printer
SIID_SERVERSHARE = 51        # Server share
SIID_PRINTERFAX = 52         # Fax printer
SIID_PRINTERFAXNET = 53      # Networked Fax Printer
SIID_PRINTERFILE = 54        # Print to File
SIID_STACK = 55              # Stack
SIID_MEDIASVCD = 56          # SVCD Media
SIID_STUFFEDFOLDER = 57      # Folder containing other items
SIID_DRIVEUNKNOWN = 58       # Unknown drive
SIID_DRIVEDVD = 59           # DVD Drive
SIID_MEDIADVD = 60           # DVD Media
SIID_MEDIADVDRAM = 61        # DVD-RAM Media
SIID_MEDIADVDRW = 62         # DVD-RW Media
SIID_MEDIADVDR = 63          # DVD-R Media
SIID_MEDIADVDROM = 64        # DVD-ROM Media
SIID_MEDIACDAUDIOPLUS = 65   # CD+ (Enhanced CD) Media
SIID_MEDIACDRW = 66          # CD-RW Media
SIID_MEDIACDR = 67           # CD-R Media
SIID_MEDIACDBURN = 68        # Burning CD
SIID_MEDIABLANKCD = 69       # Blank CD Media
SIID_MEDIACDROM = 70         # CD-ROM Media
SIID_AUDIOFILES = 71         # Audio files
SIID_IMAGEFILES = 72         # Image files
SIID_VIDEOFILES = 73         # Video files
SIID_MIXEDFILES = 74         # Mixed files
SIID_FOLDERBACK = 75         # Folder back
SIID_FOLDERFRONT = 76        # Folder front
SIID_SHIELD = 77             # Security shield. Use for UAC prompts only.
SIID_WARNING = 78            # Warning
SIID_INFO = 79               # Informational
SIID_ERROR = 80              # Error
SIID_KEY = 81                # Key / Secure
SIID_SOFTWARE = 82           # Software
SIID_RENAME = 83             # Rename
SIID_DELETE = 84             # Delete
SIID_MEDIAAUDIODVD = 85      # Audio DVD Media
SIID_MEDIAMOVIEDVD = 86      # Movie DVD Media
SIID_MEDIAENHANCEDCD = 87    # Enhanced CD Media
SIID_MEDIAENHANCEDDVD = 88   # Enhanced DVD Media
SIID_MEDIAHDDVD = 89         # HD-DVD Media
SIID_MEDIABLURAY = 90        # BluRay Media
SIID_MEDIAVCD = 91           # VCD Media
SIID_MEDIADVDPLUSR = 92      # DVD+R Media
SIID_MEDIADVDPLUSRW = 93     # DVD+RW Media
SIID_DESKTOPPC = 94          # desktop computer
SIID_MOBILEPC = 95           # mobile computer (laptop/notebook)
SIID_USERS = 96              # users
SIID_MEDIASMARTMEDIA = 97    # Smart Media
SIID_MEDIACOMPACTFLASH = 98  # Compact Flash
SIID_DEVICECELLPHONE = 99    # Cell phone
SIID_DEVICECAMERA = 100      # Camera
SIID_DEVICEVIDEOCAMERA = 101 # Video camera
SIID_DEVICEAUDIOPLAYER = 102 # Audio player
SIID_NETWORKCONNECT = 103    # Connect to network
SIID_INTERNET = 104          # Internet
SIID_ZIPFILE = 105           # ZIP file
SIID_SETTINGS = 106          # Settings
# 107-131 are internal Vista RTM icons
# 132-159 for SP1 icons
SIID_DRIVEHDDVD = 132        # HDDVD Drive (all types)
SIID_DRIVEBD = 133           # BluRay Drive (all types)
SIID_MEDIAHDDVDROM = 134     # HDDVD-ROM Media
SIID_MEDIAHDDVDR = 135       # HDDVD-R Media
SIID_MEDIAHDDVDRAM = 136     # HDDVD-RAM Media
SIID_MEDIABDROM = 137        # BluRay ROM Media
SIID_MEDIABDR = 138          # BluRay R Media
SIID_MEDIABDRE = 139         # BluRay RE Media (Rewriable and RAM)
SIID_CLUSTEREDDRIVE = 140    # Clustered disk

# defined in ShellAPI.h
# specified to SHGetStockIconInfo() as the uFlags argument
SHGSI_ICONLOCATION = 0x000001000       # get icon location
SHGSI_ICON = 0x000000100               # get icon
SHGSI_SYSICONINDEX = 0x000004000       # get system icon index
SHGSI_LINKOVERLAY = 0x000008000        # put a link overlay on icon
SHGSI_SELECTED = 0x000010000           # show icon in selected state
SHGSI_LARGEICON = 0x000000000          # get large icon
SHGSI_SHELLICONSIZE = 0x000000004      # get shell size icon
SHGSI_SMALLICON = 0x000000001          # get small icon

# defined in WinUser.h
# specified to AppendMenu() as the uFlags argument to control the appearance and
# behavior of the new menu item
MF_INSERT = 0x00000000
MF_CHANGE = 0x00000080
MF_APPEND = 0x00000100
MF_DELETE = 0x00000200
MF_REMOVE = 0x00001000
MF_BYCOMMAND = 0x00000000
MF_BYPOSITION = 0x00000400
MF_SEPARATOR = 0x00000800
MF_ENABLED = 0x00000000
MF_GRAYED = 0x00000001
MF_DISABLED = 0x00000002
MF_UNCHECKED = 0x00000000
MF_CHECKED = 0x00000008
MF_USECHECKBITMAPS = 0x00000200
MF_STRING = 0x00000000
MF_BITMAP = 0x00000004
MF_OWNERDRAW = 0x00000100
MF_POPUP = 0x00000010
MF_MENUBARBREAK = 0x00000020
MF_MENUBREAK = 0x00000040
MF_UNHILITE = 0x00000000
MF_HILITE = 0x00000080
MF_DEFAULT = 0x00001000
MF_SYSMENU = 0x00002000
MF_HELP = 0x00004000
MF_RIGHTJUSTIFY = 0x00004000
MF_MOUSESELECT = 0x00008000
MF_END = 0x00000080  # Obsolete -- only used by old RES files

# defined in WinUser.h
# specified to AppendMenu() as the fuFlags argument
TPM_LEFTBUTTON = 0x0000L
TPM_RIGHTBUTTON = 0x0002L
TPM_LEFTALIGN = 0x0000L
TPM_CENTERALIGN = 0x0004L
TPM_RIGHTALIGN = 0x0008L
TPM_TOPALIGN = 0x0000L
TPM_VCENTERALIGN = 0x0010L
TPM_BOTTOMALIGN = 0x0020L
TPM_HORIZONTAL = 0x0000L     # Horz alignment matters more
TPM_VERTICAL = 0x0040L     # Vert alignment matters more
TPM_NONOTIFY = 0x0080L     # Don't send any notification msgs
TPM_RETURNCMD = 0x0100L
TPM_RECURSE = 0x0001L
TPM_HORPOSANIMATION = 0x0400L
TPM_HORNEGANIMATION = 0x0800L
TPM_VERPOSANIMATION = 0x1000L
TPM_VERNEGANIMATION = 0x2000L
TPM_NOANIMATION = 0x4000L
TPM_LAYOUTRTL = 0x8000L
TPM_WORKAREA = 0x10000L
